/*
 * SerializerDestination.java
 *
 * Created on June 8, 2005, 11:32 PM
 *
 * (C) R. Alexander Milowski alex@milowski.com
 */

package org.infoset.xml.util;

import org.infoset.xml.*;

/**
 *
 * @author R. Alexander Milowski
 */
public class SerializerDestination implements ItemDestination
{
   
   Serializer serializer;
   XMLWriter xmlWriter;
   
   /** Creates a new instance of SerializerDestination */
   public SerializerDestination(Serializer serializer)
   {
      this.serializer = serializer;
      this.xmlWriter = new XMLWriter(true, serializer);
   }
   
   public void send(Item item)
      throws XMLException
   {
      xmlWriter.write(item);
   }
   
   
   
}
